{extend name="../../base/view/layout" /}
{block name="my_body"}
<div class="maincontent">
    <div class="maincontentinner">

        <form  enctype="multipart/form-data" method="post" action="<?php echo url('shop/Goodsattr/goods_num',['id'=>$gnData['id']]);?>">
            <table  class="table table-bordered">
                <thead>
                <tr>
                    <?php
                 $count=0;
                 foreach($data as $k=>$v):
                    $count++;
                    ?>
                    <th  ><?php echo $k;?></th>
                    <?php endforeach;?>
                    <th  >库存</th>
                    <th  >商品价格</th>
                    <th  >促销价格</th>
                    <th  >会员价格</th>
                    <th  >商品重量</th>
                    <th  >商品图片</th>
                </tr>
                </thead>
                <!--start-->
                <tbody>
                <tr>
                    <?php foreach($data as $k=>$v):?>
                    <td >
                            <?php foreach($v as $k1=>$v1):
                            $gaid=explode(',',$gnData['goods_attr_id']);
                            if(in_array($v1['id'],$gaid))
                            echo $v1['attr_value'];
                            ?>
                            <?php endforeach;?>
                    </td>
                    <?php endforeach;?>
                    <input type="hidden" name="goods_id" value="<?php echo $goods_id;?>" />
                    <input type="hidden" name="id" value="<?php echo $gnData['id'];?>" />
                    <td ><input type="text" name="goods_number" value="<?php echo $gnData['goods_number'];?>"/></td>
                    <td ><input type="text" name="goods_price" value="<?php echo $gnData['goods_price'];?>"  /></td>
                    <td ><input type="text" name="promote_price" value="<?php echo $gnData['promote_price'];?>" /></td>
                    <td ><input type="text" name="member_price" value="<?php echo $gnData['member_price'];?>"  /></td>
                    <td ><input type="text" name="goods_weight" value="<?php echo $gnData['goods_weight'];?>"  />&ensp;kg</td>
                    <td ><input type="file" name="goods_pic"  /><?php showImage($gnData['goods_sm_pic'],20,20);?></td>
                </tr>
                <!--end-->
                </tbody>
                <tbody>
                <tr>
                    <td colspan="<?php echo $count+6;?>" align="right"><input type='submit' value='提交' style="background:#46b8da;padding:5px 10px;color:#fff;margin-right:150px;border:0px;"/></td>
                </tr>
                </tbody>
            </table>
        </form>


    </div><!--maincontentinner-->
</div><!--maincontent-->
{/block}

{block name="my_js"}

{/block}
